import { request } from '@/utils/request'

//分页查找全部学校
export const pageSchool = function (current, size) {
  return request.get(`/organ/school/page?current=${current}&size=${size}`)
}

//保存学校
export const saveSchool = function (entity) {

  return request.post('/organ/school', entity)
}

//获得某个学校
export const getSchoolById = function (id) {
  return request.get(`/organ/school/${id}`)
}



//删除某个学校
export const removeSchool = function (id) {
  return request.delete(`/organ/school/${id}`)
}

//分页查找全部学院
export const pageCollege = function (current, size, schoolId) {
  return request.get(`/organ/college/page?current=${current}&size=${size}&schoolId=${schoolId}`)
}

//保存学院
export const saveCollege = function (entity) {

  return request.post('/organ/college', entity)
}

//获得某个学院
export const getCollegeById = function (id) {
  return request.get(`/organ/college/${id}`)
}

//删除某个学院
export const removeCollege = function (id) {
  return request.delete(`/organ/college/${id}`)
}

//修改学院
export const updateCollege = function (id, entity) {
  return request.put(`/organ/college/${id}`, entity)
}
